package io.kiki.sba.registry.client.remoting;


import io.kiki.stack.netty.channelManager.Channel;
import io.kiki.stack.netty.channelManager.ChannelEventProcessor;
import lombok.Getter;
import lombok.Setter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Setter
@Getter
public class ClientConnectionCloseEventProcessor implements ChannelEventProcessor {
    private static final Logger logger = LoggerFactory.getLogger(ClientConnectionCloseEventProcessor.class);


    @Override
    public void onEvent(Channel channel, String remoteAddr) {
        if (null != channel) {
            logger.info("[connection] Client disconnected, remote address: {}, localAddress: {}", remoteAddr, channel.getLocalAddress());
        }
    }
}
